// 菜单相关API
import request from '@/utils/request'

// 获取菜单列表
export const MenuList = (data) => {
  return request({
    url: '/api/Menu/MenuList',
    method: 'post',
    data
  })
}

// 获取菜单详情
export const MenuDetail = (data) => {
  return request({
    url: '/api/Menu/MenuList',
    method: 'post',
    data
  })
}

// 提交菜单信息
export const SubmitMenu = (data) => {
  return request({
    url: '/api/Menu/SubmitMenu',
    method: 'post',
    data
  })
}

// 批量删除菜单信息
export const DelMenu = (data) => {
  return request({
    url: "/api/Menu/DelMenu",
    method: 'post',
    data
  })
}

// 获取树形菜单列表
export const TreeMenuList = () => {
  return request({
    url: "/api/Menu/TreeMenuList",
    method: 'post'
  })
}

// 获取全部树形菜单节点列表
export const AllTreeMenuNodeList = () => {
  return request({
    url: "/api/Menu/AllTreeMenuNodeList",
    method: 'post'
  })
}

// 获取登录用户拥有的权限菜单列表
export const UserRoleMenuList = () => {
  return request({
    url: "/api/Menu/UserRoleMenuList",
    method: 'post'
  })
}

// 获取登录用户拥有的树形权限菜单列表
export const UserRoleTreeMenuList = () => {
  return request({
    url: "/api/Menu/UserRoleTreeMenuList",
    method: 'post'
  })
}

// 获取指定角色拥有的权限菜单列表
export const UserRoleMenuListById = (data) => {
  return request({
    url: "/api/Menu/UserRoleMenuListById",
    method: 'post',
    data
  })
}

// 提交角色菜单授权信息
export const SubmitUserRoleMenu = (data) => {
  return request({
    url: "/api/Menu/SubmitUserRoleMenu",
    method: 'post',
    data
  })
}
